﻿{% extends "base/base.html" %}


{% block titulo %}{{block.super}} | Vídeos{% endblock %}

{% block scripts %}
{{block.super}}
<script language="javascript"> 
function validaBusca()
{
	var strBusca = document.getElementById("strBusca"); 
	if (strBusca.value == "") 
	{
		alert("Digite um termo a ser pesquisado!"); 
		strBusca.focus(); 
		return false; 
	}
	return true;
}
</script>
{% endblock %}

{% block busca %}
	<form action="/videos/busca/" method="get" >
		Buscar: <input type="text" id="strBusca" name="strBusca" /> <br /><br />
		<input type="submit" id="enviar" name="enviar" value="Buscar" onclick="return validaBusca();" /> 
	</form>
	<br />
	<br />
{% endblock %}

{% block outros %}

		<div style="padding: 5px 10px 1px 0; float: left;"></div>
		<br />
		{% for video in videoList.object_list %}
			<center>
			<h4>{{ video.title}}</h4><br />
			{{ video.embededCode|safe }}</center><br /><br />
		{% endfor %}
	<br /><br />
	
	 {% if videoList %}

	    <div class="pagination">
		<span class="step-links">
		   
		    <span class="current">
			Página {{ videoList.number }} de {{ videoList.paginator.num_pages }}.
		    </span>
		    
		    {% if videoList.has_previous %}
			<br />
			
			<a href="?page={{ videoList.previous_page_number }}"><< anterior</a>
		    {% endif %}
		    &nbsp;&nbsp;
		    {% if videoList.has_next %}
				<a href="?page={{ videoList.next_page_number }}">próxima >></a>
		    {% endif %}
		    <br /><br />
		</span>
	    </div>
	  {% endif %}
	  
	  
	<center><input type="button" value="Voltar" style="width: 50px;" onClick="javascript:history.go(-1); "/></center>
	<br /><br />
	

{% endblock %}
